#include "Spirit.h"

extern SDL_Renderer* pRenderer;

Spirit::Spirit(){
}


Spirit::~Spirit() {
}

void Spirit::CreateSpirit(SDL_Surface *sSurface) {
	pSurface = sSurface;
	m_rect.w = sSurface->w;
	m_rect.h = sSurface->h;
	m_rect.x = 0;
	m_rect.y = 0;
	pTexture = SDL_CreateTextureFromSurface(pRenderer, pSurface);
}

void Spirit::Draw(SDL_Renderer *render) {
	SDL_RenderCopy(pRenderer, this->pTexture, NULL, &this->m_rect);
}

void Spirit::Draw(SDL_Surface *surface) {
	SDL_BlitSurface(this->pSurface, NULL, surface, &this->m_rect);
}